#include <OgreRoot.h>
#include <OgreLogManager.h>
#include <OgreLog.h>
#include <OgrePrerequisites.h>
#include <OgreString.h>

#define DLL_EXPORT __declspec(dllexport)

using namespace Ogre;

extern "C" DLL_EXPORT void *getLogManager()
{
    return new LogManager;
}

extern "C" DLL_EXPORT void *call_createLog(void *ptrToWrapper, const char *name, bool defaultLog, bool debuggerOutput, bool suppressFileOutput)
{
    return ((LogManager*)ptrToWrapper)->createLog((String)name, defaultLog, debuggerOutput, suppressFileOutput);
}  //returns a pointer to a Log

extern "C" DLL_EXPORT void call_setLogDetail(void *ptr, LoggingLevel ll)
{
    ((LogManager*)ptr)->setLogDetail(ll);
}

extern "C" DLL_EXPORT Log *call_getDefaultLog(LogManager *ptr)
{
	return ptr->getDefaultLog();
}

extern "C" DLL_EXPORT LogManager *call_LogManager_getSingleton()
{
	return LogManager::getSingletonPtr();
}